using System.Data;
using System.Data.OleDb;
using System.Data.OracleClient;


namespace lib
{
    
	public class myDBConn 
	{

	//private string  ConnStr = GlobalVar.OraConnStr;

		//public DataTable myOleDbTable(string  SQL)  
		//				 {
							 //	Dim cn As OleDbConnection
							 //	Dim dsTemp As DataSet
							 //	Dim dsCmd As OleDbDataAdapter
							 //	Dim ConnSt As String
							 //	ConnSt = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & GlobalVar.root & "persistent\ccapps.mdb"
							 //
							 //	cn = New OleDbConnection(ConnSt)
							 //
							 //	dsCmd = New OleDbDataAdapter(SQL, cn)
							 //	dsTemp = New DataSet
							 //	dsCmd.Fill(dsTemp, "Query")
		//					 Return dsTemp.Tables(0)
							 //	dsTemp.Dispose()
		//				 }
//
//	Public Shared Function myORATable(ByVal SQL As String) As DataTable
//	Dim cn As OracleConnection
//	Dim dsTemp As DataSet
//	Dim dsCmd As OracleDataAdapter
//
//	cn = New OracleConnection(ConnStr)
//
//
//	dsCmd = New OracleDataAdapter(SQL, cn)
//	dsTemp = New DataSet
//	dsCmd.Fill(dsTemp, "Query")
//	cn.Close()
//
//	Return dsTemp.Tables(0)
//	dsTemp.Dispose()
//	End Function

//	Public Function myOraResult(ByVal SQL As String) As ArrayList 'OracleDataReader
//	Dim cn As OracleConnection
//	Dim dbcmd As OracleCommand
//	Dim reader As OracleDataReader
//	Dim dsTemp As DataSet
//	Dim dsCmd As OracleDataAdapter
//	Dim list As ArrayList
//
//	cn = New OracleConnection(ConnStr)
//	cn.Open()
//
//	dbcmd = cn.CreateCommand
//	dbcmd.CommandText = SQL
//	reader = dbcmd.ExecuteReader(CommandBehavior.CloseConnection)
//	Dim lst As New ArrayList
//	lst.Add(reader)
//
//
//	Return lst
//
//	End Function
//
//
//
//	Public Shared Function Execute(ByVal SQL As String) As Long
//
//	Dim ConnSt As String
//	'ConnSt = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\db\ccapps.mdb"
//	ConnSt = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & GlobalVar.root & "persistent\ccapps.mdb"
//
//	Dim cn As New OleDbConnection(ConnSt)
//	Dim objCmd As New OleDbCommand(SQL, cn)
//	Dim lngResult As Long = 0
//
//	objCmd.Connection.Open()
//	lngResult = objCmd.ExecuteNonQuery
//	cn.Close()
//	Return lngResult
//	End Function
//
//	Public Shared Function ORAExecute(ByVal SQL As String) As Long
//
//	Dim cn As New OracleConnection(ConnStr)
//	Dim objCmd As New OracleCommand(SQL, cn)
//	Dim lngResult As Long = 0
//
//	objCmd.Connection.Open()
//	lngResult = objCmd.ExecuteNonQuery
//	cn.BeginTransaction.Commit()
//	cn.Close()
//	Return lngResult
//	End Function
//
//
//	Public Shared Function ORAScalar(ByVal p_SQL As String) As Object
//	Dim l_cn As OracleConnection
//	Dim l_dsTemp As DataSet
//	Dim l_dsCmd As OracleDataAdapter
//	Dim l_retval As Object
//	l_cn = New OracleConnection(ConnStr)
//	l_dsCmd = New OracleDataAdapter(p_SQL, l_cn)
//	l_dsTemp = New DataSet
//	l_dsCmd.Fill(l_dsTemp, "Query")
//	l_cn.Close()
//	Try
//	l_retval = CObj(l_dsTemp.Tables(0).Rows(0).Item(0))
//	Catch ex As Exception
//	l_retval = DBNull.Value
//	End Try
//	l_dsTemp.Dispose()
//	Return l_retval
//		End Function



		}
}
